<?php

namespace app\controller\index;

use app\result\CategoryResult;
use think\App;

class Category extends BaseIndex
{
    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->objResult = new CategoryResult();
    }

    //分类
    public function list()
    {
        data_exit_json($this->objResult->list($this->user_id, $this->param));
    }

    public function get($id)
    {
        data_exit_json($this->objResult->get($this->user_id, $id));
    }

    public function action()
    {
        data_exit_json($this->objResult->action($this->user_id, $this->param));
    }

    //删除
    public function delete($id)
    {
        data_exit_json($this->objResult->delete($this->user_id, $id));
    }

    public function icon_list()
    {
        data_exit_json($this->objResult->icon_list());
    }
}
